- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25
Introduce "too late" as an event presence status #3564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 
 Additional details and impacted files@@            Coverage Diff             @@
##           master    #3564      +/-   ##
==========================================
+ Coverage   88.24%   88.27%   +0.03%     
==========================================
  Files         677      679       +2     
  Lines       21385    21441      +56     
==========================================
+ Hits        18871    18927      +56     
  Misses       2514     2514              ☔ View full report in Codecov by Sentry. | 
Similar to the "not present" status, the user will automatically recieve a penalty. I figured all previous penalties can be removed since only the newest one should matter. I would like some input as to how this will affect other penalties, e.g. given due to late payments (or other things?), as they will also be removed if the presence is changed to something worthy of a penalty. Should we consider to introduce "penalty types" stored on the record, e.g. "presence", "payment", "other"? Also, this resolves a bug, as it is currently not possible to auto delete previous penalties related to the event due to the `.delete()` not being at the end the atomic block. Not sure why it had to be atomic in the first place.
e6f4aae    to
    425e53c      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff!
d7117b0    to
    c691405      
    Compare
  
    Used to distinguish and delete the correct penalties, as penalties from the same type (and event) should in theory never stack.
c691405    to
    c9acb5f      
    Compare
  
    
Similar to the "not present" status, the user will automatically receive a penalty. I figured all previous penalties of type "presence" can be removed since they should not stack.
Also, this resolves a bug, as it is currently not possible to auto delete previous penalties related to the event due to the
.delete()not being at the end the atomic block. Not sure why it had to be atomic in the first place.